package org.ddd.productdemo.domaindriven.application.dto;

import java.util.ArrayList;
import java.util.List;

public class OrderRequest {

    private String customerId;

    private List<OrderItem> items = new ArrayList<>();

    public String getCustomerId() {
        return customerId;
    }

    public OrderItem[] getItems() {
        return items.toArray(new OrderItem[0]);
    }


    public class OrderItem{

        private Long productId;

        private Integer quantity;

        public Long getProductId() {
            return productId;
        }

        public int getQuantity() {
            return quantity;
        }
    }
}
